<?php
/* @var $this NewLedgerController */
/* @var $model NewLedger */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'new-ledger-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'new_ledger_no'); ?>
		<?php echo $form->textField($model,'new_ledger_no'); ?>
		<?php echo $form->error($model,'new_ledger_no'); ?>
	</div>
	
	<div>
<?php echo $form->labelEx($model,'soldier_id'); ?>
<?php echo $form->dropDownList($model, 'soldier_id', CHtml::listData(
Soldier::model()->findAll(), 'id', 'serial_no','soldier_l_name'),
array('prompt' => 'Select an soldier')
); ?>
<?php echo $form->error($model,'soldier_id'); ?>

</div>

<div class="row">
		<?php echo $form->labelEx($model,'branch_of_service'); ?>
		<?php echo $form->dropDownList($model, 'branch_of_service', $model->Getbranch_of_service(),
		array('prompt' => 'branch of services')
		); ?>
		<?php echo $form->error($model,'branch_of_service'); ?>
	</div>

	<div class="row">
		<?php echo CHtml::activeLabelEx($model,'new_ledger_date'); ?>
		<?php echo CHtml::activeTextField($model,'new_ledger_date',array("id"=>"a_date")); ?>
		<?php echo CHtml::image("images/cal.jpg","calendar",
		array("id"=>"a_button","class"=>"pointer")); ?>
		&nbsp;(Click this)
		<?php $this->widget('application.extensions.calendar.SCalendar',
        array(
        'inputField'=>'a_date',
        'button'=>'a_button',
        'ifFormat'=>'%Y-%m-%d',
    ));
    ?>
		<?php echo $form->error($model,'new_ledger_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'new_ledger_quarters_id'); ?>
		<?php echo $form->textField($model,'new_ledger_quarters_id',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'new_ledger_quarters_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'new_ledger_updates'); ?>
		<?php echo $form->textArea($model,'new_ledger_updates',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'new_ledger_updates'); ?>
	</div>
	
	
	<div class="row">
		<?php echo CHtml::activeLabelEx($model,'new_ledger_update_date'); ?>
		<?php echo CHtml::activeTextField($model,'new_ledger_update_date',array("id"=>"b_date")); ?>
		<?php echo CHtml::image("images/cal.jpg","calendar",
		array("id"=>"b_button","class"=>"pointer")); ?>
		&nbsp;(Click this)
		<?php $this->widget('application.extensions.calendar.SCalendar',
        array(
        'inputField'=>'b_date',
        'button'=>'b_button',
        'ifFormat'=>'%Y-%m-%d',
    ));
    ?>
		<?php echo $form->error($model,'new_ledger_update_date'); ?>
	</div>
	
	

	
<div>
<?php echo $form->labelEx($model,'employee_id'); ?>
<?php echo $form->dropDownList($model, 'employee_id', CHtml::listData(
Employee::model()->findAll(), 'id', 'employee_id','employee_name'),
array('prompt' => 'Select an Employee')
); ?>
<?php echo $form->error($model,'employee_id'); ?>

</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->